home *** CD-ROM | disk | FTP | other *** search
-
- #define TRUE 1
- #define FALSE 0
- #define ERR (-1)
-
- #define uchar unsigned char
- #define ushort unsigned short
- #define uint unsigned int
- #define ulong unsigned long
-
- #define MAX_DEV 16
- #define MAX_SEC 1024
- #define MAX_HASH 16
- #define HASH(s) ((s)&15)
-
- #define USE_DEV 0xFF
- #define FRE_DEV 0xFE
- #define CHE_DEV 0
-
- typedef struct _BP {
- struct _BP *next;
- uchar sum;
- uchar dev;
- long sec;
- } SEC_PTR;
-
- typedef struct {
- char far *next;
- short dev_sts;
- short str_ent;
- short int_ent;
- char res[8];
- } DEVHED;
-
- typedef struct _DPB {
- uchar DrvNum;
- uchar UnitNum;
- short SecLen;
- uchar SecAlc;
- uchar Shift;
- short ResSec;
- uchar FatLen;
- short DirEnt;
- short DatSec;
- short MaxCls;
- uchar FatSec;
- short DirSta;
- DEVHED far *DevEnt;
- uchar MedId;
- uchar DskCng;
- struct _DPB far *NxtDPB;
- short CurDir;
- } DPB;
-
- typedef struct {
- short SecLen;
- uchar SecAlc;
- short ResSec;
- uchar FatLen;
- short DirEnt;
- short MaxSec;
- uchar MedId;
- short FatSec;
- } BPB;
-
- typedef struct _RH {
- uchar len;
- uchar unit;
- uchar cmds;
- short stat;
- uchar res[8];
- uchar md_id;
- union {
- struct {
- short now_sts;
- } chk;
- struct {
- uchar far *work;
- BPB far *bpb;
- } build;
- struct {
- uchar far *buff;
- short count;
- short sect;
- } rdwt;
- struct {
- char mode;
- char max_dev;
- DPB far *dpb_ptr;
- SEC_PTR far *lru_tbl;
- SEC_PTR far *use_tbl;
- } ext;
- struct {
- ushort psp_seg;
- } quit;
- } x;
- } REQ;